/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.yonsei.iwb.sdt.datastructure.rule;

import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.Resource;
import java.util.Vector;
import org.yonsei.iwb.sdt.refinement.ConstraintConstructor;
import org.yonsei.iwb.sdt.refinement.ExpandingHistory;
import org.yonsei.iwb.sdt.refinement.Refinement;

/**
 *
 * @author JDK
 */
public class DecisionRuleComponent {
//    private int refType;
    private ExpandingHistory eh;
//    private Vector<ConstraintConstructor> ccset;
    private ConstraintConstructor cc;
    private Refinement ref;
//    private boolean brtype;
//    private Vector<NodeExpressionRuleComponent> nercSet;
    
//    public NodeExpressionRuleComponent(ExpandingHistory eh, ConstraintConstructor cco){
//        
//    }
    
    
    
    public DecisionRuleComponent(Refinement ref){
        this.eh = ref.getExpandingHistory();
        this.cc = ref.getConstraintConstructor();
        this.ref = ref;
//        this.brtype = ref.getBranchingType();
    }
    
//    public Vector<ConstraintConstructor> getConstraintConstructorSet(){
//        return this.ccset;
//    }
        
    public ExpandingHistory getExpandingHistory(){        
        return this.eh;
    }
    
    public boolean getBranchingType(){
        return this.ref.getBranchingType();
    }
    
    public Vector<Resource> getConditionMatchedResources(Model model){
        return this.ref.getConstraintMatcherInstance(model);
    }
    
    @Override
    public String toString(){
        return this.ref.getName();
    }
    
}
